import { request } from '@/utils/request';

export interface Banner {
  url: string;
  _id: string;
  target: string;
  picurl: string;
  appid?: string;
  path?: string;
}
export interface Random {
  nickname: string;
  _id: string;
  tabs: string[];
  smallPicurl: string;
  score: string;
  description: string;
  classid: string;
}
export interface News {
  author: string;
  _id: string;
  publish_date: number;
  select: boolean;
  title: string;
  view_count: number;
}

export const apiGetBanner = () => {
  return request<Banner[]>('/homeBanner');
};
export const apiGetRandomWall = () => {
  return request<Random[]>('/randomWall');
};
export const apiGetWallNewsList = (data: { select?: boolean } = {}) => {
  return request<News[]>('/wallNewsList', {
    data,
  });
};
